class Myreadfile():
    """

    Arguments
    ---------


    Returns
    -------

    """

    def __init__(self, filepath):
        Datfile = filepath


Datfile = open("./Nugent15/data/nug15.dat")
# 获取N的个数
file = Datfile.readlines()
s = file[0]
print(s)
N = int(s)
print(N)
# 获取矩阵A
print(file[3])
A = []
hang = 0
lie = 0
for i in range(2, 2+N):
    temp = file[i][:-1].split(" ")
    A.append([int(j) for j in temp])
print(A)   # 读取矩阵A完毕
# 获取矩阵B
B = []
for i in range(2+N+1, 2+N+N):
    temp = file[i][:-1].split(" ")
    temp = [i for i in temp if i != ""]
    print(temp)
    B.append([int(j) for j in temp])
print(B)   # 读取矩阵A完毕

# for i in range(3, 3+N):
#     for j in i:
#         if j in "0123456789"

# temp = file[3]
# print(temp)
# print(list(temp))

# for line in A:

#     s = line.strip().split('\t')
#     print(s)
#     # sentimentlist.append(s)
Datfile.close()
